home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
ifxlite
/
imagefx3
/
rexx
/
autofx
/
savebufferas_jpeg.ifx.pre
< prev
next >
Wrap
Text File
|
2004-08-03
|
1KB
|
57 lines
/*
* $VER: SaveBufferAs_JPEG.ifx.pre 2.5 (11.04.96)
* Copyright © 1992-1996 Nova Design, Inc.
* Written by Thomas Krehbiel
*
* Save main buffer as JPEG.
*
* Inputs:
* Word(Arg(1),1) = Sequence number (?)
* Word(Arg(1),2) = Total number of frames (N)
*
* Returns:
* 0 if successful, non-zero on failure
*
* Revision History:
*
* 25.09.95 tek 2.1a: Fixed JPEG quality setting.
*/
OPTIONS RESULTS
base = 'Autofx_SaveBufferAsJPEG_'
seq = WORD(ARG(1),1)
lastpath = GETCLIP(base||'Path'||seq)
lastext = GETCLIP(base||'Ext'||seq)
lastq = GETCLIP(base||'Quality'||seq)
IF lastext = "" & lastpath = "" THEN lastext = ".JPG"
IF lastpath = "" THEN DO
GetPrefs SavePath
lastpath = result
END
IF lastq = "" THEN lastq = 90
Gadget.1 = 'STRING 120 5 200 14 "Output Path:" "'lastpath'"'
Gadget.2 = 'FILEREQ 321 5 20 14 "Output Path:" "'lastpath'" AT=1 DIRONLY'
Gadget.3 = 'STRING 120 20 200 14 "New Extension:" "'lastext'"'
Gadget.4 = 'TEXT 120 35 1 1 "(** = current frame number)" 1'
Gadget.5 = 'INTEGER 120 48 50 14 "JPEG Quality:"' lastq 'JU=0'
Gadget.6 = 'TEXT 180 51 1 1 "(25-100)"'
Gadget.7 = 'END'
NewComplexRequest '"Save Buffer As JPEG"' Gadget 360 68
IF rc ~= 0 THEN EXIT rc
IF result.5 < 25 THEN result.5 = 25
IF result.5 > 100 THEN result.5 = 100
CALL SETCLIP(base||'Path'||seq, result.1)
CALL SETCLIP(base||'Ext'||seq, result.3)
CALL SETCLIP(base||'Quality'||seq, result.5)
EXIT